home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / databases / intuidex2b1.lha / IntuiDex / Install_IntuiDex < prev    next >
Encoding:
Text File  |  1995-02-01  |  7.5 KB  |  175 lines

  1. ; THIS IS THE INTUIDEX 2.0 INSTALLER SCRIPT.
  2. ; INTUIDEX IS COPYRIGHT 1995, JEFFERY C. MAY
  3. ;
  4. ; THIS VERSION CREATED: JAN 31, 1995
  5. ;
  6. ; ALTHOUGH THE COMMODORE INSTALLER USES SCRIPTS THAT VERY MUCH RESEMBLE
  7. ; LISP, I HAVE ENDEVORED TO MAKE THEM LOOK AS MUCH LIKE C AS POSSIBLE.
  8. ; MAYBE THAT WAY I'LL REMEMBER HOW IT WORKS...
  9.  
  10.  
  11. ; SETUP SOME ERROR AND OTHER MESSAGES SO THAT THE CODE WILL BE A LITTLE
  12. ; EASIER TO READ...
  13. (
  14.     (set target-dir             "DH1:")
  15.     (set multiview              "sys:utilities/multiview")
  16.     (set amigaguide             "sys:utilities/amgiaguide")
  17.  
  18.     (set OtherAnnounce   (cat   "You are about to be asked to provide a "
  19.                                 "path to where you want IntuiDex to be "
  20.                                 "installed to.  If you wish to create a "
  21.                                 "drawer to put IntuiDex in, you must create "
  22.                                 "it with the \"Make New Drawer\" gadget.  "
  23.                                 "All neccessary subdirectories that are "
  24.                                 "needed will be created automatically."))
  25.  
  26.     (set AnnounceHelp    (cat   "   I need to know where you want IntuiDex "
  27.                                 "to be installed to.  The next window will "
  28.                                 "have in it a file requester in which you "
  29.                                 "can specify the location that you want "
  30.                                 "IntuiDex.\n"
  31.                                 "   I recommend that you put IntuiDex into the "
  32.                                 "same area of your hard disk that you put "
  33.                                 "your other applications, and NOT in the "
  34.                                 "system area. Grouping software like "
  35.                                 "this will make it easier to find it "
  36.                                 "later."))
  37.  
  38.     (set IXEmulNeeded    (cat   "IntuiDex requires at least Version 40 of "
  39.                                 "the IXEmul Library.  This library can be "
  40.                                 "obtained from Aminet, or through some other "
  41.                                 "source of PD and shareware software."))
  42.  
  43.     (set intuitionNeeded (cat   "IntuiDex requires at least version 37 of "
  44.                                 "the Intuition Library.  If your system does "
  45.                                 "not have at least release 2.04 of the Amiga "
  46.                                 "operating system, IntuiDex will not operate."))
  47.  
  48.     (set gadtoolsNeeded (cat "  IntuiDex requires at least version 37 of "
  49.                                 "the GadTools Library.  If your system does "
  50.                                 "not have at least release 2.04 of the Amiga "
  51.                                 "operating system, IntuiDex will not operate."))
  52.  
  53.     (set aslNeeded       (cat   "IntuiDex requires at least version 37 of "
  54.                                 "the ASL Library.  If your system does "
  55.                                 "not have at least release 2.04 of the Amiga "
  56.                                 "operating system, IntuiDex will not operate."))
  57.  
  58.     (set graphicsNeeded (cat    "IntuiDex requires at least version 37 of "
  59.                                 "the Graphics Library.  If your system does "
  60.                                 "not have at least release 2.04 of the Amiga "
  61.                                 "operating system, IntuiDex will not operate."))
  62.  
  63.     (set utilityNeeded   (cat   "IntuiDex requires at least version 37 of "
  64.                                 "the Utility Library.  If your system does "
  65.                                 "not have at least release 2.04 of the Amiga "
  66.                                 "operating system, IntuiDex will not operate."))
  67.  
  68.     (set iconNeeded      (cat   "IntuiDex requires at least version 37 of "
  69.                                 "the Icon Library.  If your system does "
  70.                                 "not have at least release 2.04 of the Amiga "
  71.                                 "operating system, IntuiDex will not operate."))
  72.  
  73.     (set amigaguideNeeded (cat  "IntuiDex requires at least version 34 of "
  74.                                 "the AmigaGuide Library.  Your system does "
  75.                                 "not have the AmigaGuide Library, which was "
  76.                                 "included with release 3.0 and above of the Amiga "
  77.                                 "operating system.  "
  78.                                 "Note that the AmigaGuide system can be obtained "
  79.                                 "from Aminet, or any other source of PD and shareware "
  80.                                 "software."))
  81. )
  82.  
  83.  
  84. ; MAKE SURE THAT THEY'RE USING THE PROPER OPERATING SYSTEM...
  85. ; INTUIDEX ONLY WORKS WITH SYSTEMS THAT HAVE AT LEAST RELEASE 2.04
  86. ; (VERSION 37) OF THE AMIGA OS.
  87. (
  88.     (
  89.         (set IXEmulVer
  90.             (/ (getversion "libs:ixemul.library") 65536))
  91.  
  92.         (set intuitionVer
  93.             (/ (getversion "intuition.library" (resident)) 65536))
  94.  
  95.         (set gadtoolsVer
  96.             (/ (getversion "gadtools.library" (resident)) 65536))
  97.  
  98.         (set aslVer
  99.             (/ (getversion "asl.library" (resident)) 65536))
  100.  
  101.         (set graphicsVer
  102.             (/ (getversion "graphics.library" (resident)) 65536))
  103.  
  104.         (set utilityVer
  105.             (/ (getversion "libs:utility.library" (resident)) 65536))
  106.  
  107.         (set iconVer
  108.             (/ (getversion "icon.library" (resident)) 65536))
  109.  
  110.         (set amigaguideVer
  111.             (/ (getversion "libs:amigaguide.library") 65536))
  112.     )
  113. )
  114.  
  115.  
  116. ; NOW WE HAVE THE VERSION NUMBERS FOR ALL THE REQUIRED LIBRARIES.
  117. ; MAKE SURE THAT THEY'RE NEW ENOUGH TO WORK.
  118. (
  119.     (if (< IXEmulVer 40)        ((message    IXEmulNeeded) (exit (quiet))))
  120.     (if (< intuitionVer 37)     ((message    intutionNeeded) (exit (quiet))))
  121.     (if (< gadtoolsVer 37)      ((message    gadtoolsNeeded) (exit (quiet))))
  122.     (if (< aslVer 37)           ((message    aslNeeded) (exit (quiet))))
  123.     (if (< graphicsVer 37)      ((message    graphicsNeeded) (exit (quiet))))
  124.     (if (< utilityVer 3)7       ((message    utilityNeeded) (exit (quiet))))
  125.     (if (< iconVer 37)          ((message    iconNeeded) (exit (quiet))))
  126.     (if (< amigaguideVer 34)    ((message    amigaguideNeeded) (exit (quiet))))
  127. )
  128.  
  129.  
  130.  
  131. ; GET THE LOCATION FROM THE USER WHERE TO PUT INTUIDEX
  132. ; NOTE THAT IF THE USER SELECTED "NOVICE" AS HIS USER LEVEL, THEN WE NEED
  133. ; TO SKIP THIS, AND JUST INSTALL INTUIDEX TO THE DH1: (WORK) PARTITION
  134. (
  135.     (if (> @user-level 0)
  136.         (
  137.             (message OtherAnnounce (help AnnounceHelp))
  138.             (set @default-dest  target-dir)
  139.             (set target-dir
  140.             (askdir     (prompt     "Where should I put IntuiDex?")
  141.                         (help       @askdir-help)
  142.                         (default    @default-dest)
  143.                         (newpath)
  144.                         (disk))
  145.             )
  146.         )
  147.     )
  148. )
  149.  
  150.  
  151. ; NOW WE'LL COPY THE FILES...
  152. ; THE VARIABLE @default-dest NOW HOLDS THE DIRECTORY WHERE WE'RE GOING
  153. ; TO BE PLACING ALL THE FILES.  NOW WE CAN COPY STUFF...
  154. (set  src (pathonly @icon))
  155. (copyfiles  (source src)
  156.             (dest   target-dir)
  157.             (all)
  158. )
  159.  
  160.  
  161.  
  162. ; NOW, SET THE @default-dest VARIABLE TO POINT TO WHERE WE PUT THE STUFF
  163. ; SO THAT THE COMPLETION MESSAGE WILL BE RIGHT.
  164. (if (> @user-level 0) (set    @default-dest   target-dir))
  165.  
  166.  
  167. ; AT THE END NOW- LET'S BE NICE AND AUTOMATICALLY START THE ON-LINE HELP
  168. ; AMIGAGUIDE FILE IF WE CAN.  WE NEED TO CHECK AND SEE IF MULTIVIEW IS
  169. ; PRESENT IN THE SYS:UTILITIES DRAWER FIRST.
  170. (if (= (exists multiview (noreq)) 1)
  171.     (
  172.         (set AGCommand (cat multiview " \"" (tackon target-dir "help/IntuiDex.guide") "\""))
  173.         (run AGCommand)
  174.     )
  175. )